<%@ page import="top.liuzhenyu.study.javawebjdbc.entity.TbMovie" %>
<%@ page import="top.liuzhenyu.study.javawebjdbc.dao.TbMovieDAO" %><%--
  Created by IntelliJ IDEA.
  User: liuzhenyu
  Date: 2024/5/30
  Time: 10:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

    <%
        request.setCharacterEncoding("utf-8");

        TbMovie movie = new TbMovie();
        movie.setMovie(request.getParameter("movie"));
        movie.setInfo(request.getParameter("info"));
        movie.setScore(Integer.parseInt(request.getParameter("score")));
        TbMovieDAO.insert(movie);

    %>

    <script>
        alert("添加成功");
        location.href = "list.jsp";
    </script>

</body>
</html>
